<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>点点控</title>
    <script type="text/javascript" src="assets/js/blockly_compressed.js"></script>
    <script type="text/javascript" src="assets/js/blocks_compressed.js"></script>
      <script type="text/javascript" src="assets/js/javascript_compressed.js"></script>
    <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="assets/js/Blob.js"></script>
    <script type="text/javascript" src="assets/js/FileSaver.min.js"></script>
  <script src="assets/js/msg/zh-hans.js"></script>
  
  <style>
    body {
      background-color: #fff;
      font-family: sans-serif;
    }
    h1 {
      font-weight: normal;
      font-size: 140%;
    }
  </style>
</head>
<body>
<table   width = 100% >
  <tr align=center> <td colspan = 3>
        <h1>点点控 </h1>
          

        <p id="state">已经停止</p>
        <p>
            <button onclick="showXml()">Show xml</button>
            <button onclick="showJsCode()">Show Js</button>
           <!--  <button onclick="runCode()">runCode</button> -->
            <button onclick="run()">run</button>
            <button onclick="stop()">stop</button>
            <button onclick="upload()">上载XML</button>           
            <button onclick="save()">保存XML</button> 
            <button onclick="load_it()">加载本地文件</button>   
            <input type="file" id="load" style="display: none;"/>     
        </p>

    </td></tr>
 
  <tr align=center>  <td><div id="blocklyDiv" style = "height:420px"></div></td></tr>
    
  
  </table>  
<table   width = 50% align=center>
    <tr align=center>
   <td id="temperature">温度:<span id="temperature_span">0</span></td>
   <td>面部识别:<span>识别成功</span></td>
   <td id="conditioner">空调设置<span id="conditioner_set">0</span></td>
   <td id="door">门:<span id="door_op">关</span></td>
   <td >窗户1:<span>关</span></td>
   <td>窗户2:<span>关</span></td>
   <td>窗户3:<span>关</span></td>
  </tr>
  </table>
<xml id="toolbox" style="display: none">
   
    <category name="流程">
        <block type="controls_if"></block>

        <block type="logic_compare"></block>
        <block type="math_number"></block>
        <block type="condtioner">
          <value name="temperature">
              <block type="math_number">
                <field name="NUM">0</field>
              </block>
            </value>          
        </block>
        <block type="open_door"></block>
        <block type="close_door"></block>
        <block type="temperature"></block>  <!-- 温度值，返回数值-->
        <block type="face_match"></block> <!-- 识别脸，返回布尔值-->
        <block type="win1"></block>     <!-- 窗户1，返回布尔值-->
       <block type="win2"></block>     <!-- 窗户2，返回布尔值-->
       <block type="win3"></block>     <!-- 窗户3，返回布尔值-->
        <block type = "state_save"></block> <!-- 状态存证,输入三个窗户的状态-->
         
         <block type="controls_repeat_ext">
            <value name="TIMES">
              <block type="math_number">
                <field name="NUM">10</field>
              </block>
            </value>
          </block>
          <block type="controls_whileUntil"></block>
          <block type="controls_for">
            <field name="VAR">i</field>
            <value name="FROM">
              <block type="math_number">
                <field name="NUM">1</field>
              </block>
            </value>
            <value name="TO">
              <block type="math_number">
                <field name="NUM">10</field>
              </block>
            </value>
            <value name="BY">
              <block type="math_number">
                <field name="NUM">1</field>
              </block>
            </value>
          </block>
    </category>
    <category name="数学">
        <block type="math_random_int"></block>
        <block type="math_arithmetic"></block>
        <block type="math_number"></block>
    </category>
    
    <sep gap="8"></sep>
    <category custom="VARIABLE" name="变量">
   
</xml>
 <script>
  
 </script>
  <script type="text/javascript" src="assets/js/diandiankong.js"></script>
<script>
 
</script>
</body>
</html>